@import "./uni_modules/uview-ui/theme.scss";
//主要颜色
$color-primary: #DAA665;
$color-primary-fade: rgba(218, 166, 101, .1);
$color-secondary: #2B3037;
$color-secondary-fade: rgba(43, 48, 55, .1);
$color-success: #00C279;
$color-success-fade: rgba(0, 194, 121, .1);
$color-warning: #FAAD14;
$color-warning-fade: rgba(250, 173, 20, .1);
$color-error: #FF4D4F;
$color-error-fade: rgba(255, 77, 79, .1);

//文字颜色
$font-color-button: #7A5032;
$font-color-black: #000000;
$font-color-white: #FFFFFF;
$font-color-blue: #0080FF;
$font-color-t1: #333333;
$font-color-t2: #666666;
$font-color-t3: #999999;

//边框背景颜色
$color-border: #E1E1E1;
$color-background: #F4F4F4;
$color-background-button: linear-gradient(to right, #f2c790, #daa665);
$color-background-button-hover: linear-gradient(to right, #d9b381, #c4955b);
$color-shadow-button: 0 8rpx 14rpx 2rpx rgba(138,76,0,0.16);
$color-background-button-black: linear-gradient(to right, #393F47, #2B3037);

//圆角
$radius-default:14rpx;

//阴影
$box-shadow:0 0 12rpx 2rpx rgba(153,153,153,0.2);

//#ifndef APP-NVUE
//文本格式化，超出范围，显示省略号
@mixin text-overflow($line:1,$width:100%) {
  @if ($line==1) {
    white-space: nowrap;
    word-break: break-all;
  }
  text-overflow: -o-ellipsis-lastline;
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp: $line;
  line-clamp: $line;
  width: $width;
}
//#endif

//弹性布局
@mixin flex($direction:row,$justify:flex-start,$align:flex-start,$flex-wrap: null) {
  //#ifndef APP-NVUE
  display: flex;
  //#endif
  @if ($direction!=null) {
    flex-direction: $direction;
  }
  @if ($justify!=null) {
    justify-content: $justify;
  }
  @if ($align!=null) {
    align-items: $align;
  }
  @if ($flex-wrap != null) {
    flex-wrap: $flex-wrap;
  }
}

//margin
@mixin setMargin($type:null,$value:30) {
  @if ($type==null) {
    .margin-#{$value}{
      margin:#{$value}rpx;
    }
  }
  @if ($type==top or $type==left or $type==right or $type==bottom){
    .margin-#{$type}-#{$value} {
      margin-#{$type}:#{$value}rpx;
    }
  }
  @if ($type==tb){
    .margin-#{$type}-#{$value} {
      margin-top:#{$value}rpx;
      margin-bottom:#{$value}rpx;
    }
  }
  @if ($type==lr){
    .margin-#{$type}-#{$value} {
      margin-left:#{$value}rpx;
      margin-right:#{$value}rpx;
    }
  }
}

//padding
@mixin setPadding($type:null,$value:30) {
  @if ($type==null) {
    .padding-#{$value}{
      padding:#{$value}rpx;
    }
  }
  @if ($type==top or $type==left or $type==right or $type==bottom){
    .padding-#{$type}-#{$value} {
      padding-#{$type}:#{$value}rpx;
    }
  }
  @if ($type==tb){
    .padding-#{$type}-#{$value} {
      padding-top:#{$value}rpx;
      padding-bottom:#{$value}rpx;
    }
  }
  @if ($type==lr){
    .padding-#{$type}-#{$value} {
      padding-left:#{$value}rpx;
      padding-right:#{$value}rpx;
    }
  }
}

//字号
@mixin setFontSize($size) {
  .text-#{$size} {
    font-size:#{$size}rpx;
  }
}

//定位
@mixin position($position:relative,$top:null,$right:null,$bottom:null,$left:null) {
  position: $position;
  @if ($left!="" & & $left!=null) {
    left: $left;
  }
  @if ($right!="" & & $right!=null) {
    right: $right;
  }
  @if ($top!="" & & $top!=null) {
    top: $top;
  }
  @if ($bottom!="" & & $bottom!=null) {
    bottom: $bottom;
  }
}
// @import "./uni_modules/uview-ui/theme.scss";


